//线上接文档

const install = (Vue, vm) => {
	//检查版本更新,//检查版本更新
	let version = (params = {}) => vm.$u.get('/composite/app/check/version', params);
	/* 首页 */
	//首页轮播显示商户公告列表
	let noticeList = (params = {}) => vm.$u.get('/mall-merchant/merchant/admin/notice/homePage', params);
	//订单统计数据
	let dataAnalysis = (params = {}) => vm.$u.get('/mall-order/merchant/admin/foodOrder/dataAnalysis', params);
	/* 线下商品管理 start*/
	//查询商品列表
	let foodList = (params = {}) => vm.$u.get('/mall-product/merchant/admin/offline/food/query/list', params);
	//查询商品详情
	let foodDetails = (params = {}) => vm.$u.get('/mall-product/merchant/admin/offline/food/query/details', params);
	//添加/修改 商品信息
	let foodEdit = (params = {}) => vm.$u.post('/mall-product/merchant/admin/offline/food/edit', params);
	//商品上下架//删除
	let foodStatus = (params = {}) => vm.$u.post('/mall-product/merchant/admin/offline/food/productStatus', params);
	//商品统计数量
	let foodStatistics = (params = {}) => vm.$u.get('/mall-product/merchant/admin/offline/food/statistics', params);
	/* 线下商品管理 end*/
	/* 线下应用管理 start */
	//获取支付渠道列表,打开或禁用支付渠道
	let payChannel = (params = {}) => vm.$u.get('/merchant-underline/merchant/underline/pay-channel', params);
	let payChannelOn0rOff = (params = {}) => vm.$u.put('/merchant-underline/merchant/underline/pay-channel', params);
	/* 线下应用管理 end */
	
	/* 我的 */
	let getSweet = () => vm.$u.get('/merchant-underline/merchant/sweet/sweetBalance'); // 商户余额查询
	let sweetTransfer = (params = {}) => vm.$u.post('/merchant-underline/merchant/sweet/sweetWithdrawal', params); //商户糖果划转
	let sweetQuery = (params = {}) => vm.$u.get('/merchant-underline/merchant/sweet/sweetDetailList', params); //商户糖果明细
	// 微信入驻
	let	getWxApplyPayChannel = (params = {}) => vm.$u.get('/merchant-underline/merchant/underline/apply/pay-channel', params); // 获取可入驻的支付渠道
	let	wxPayChannel = (params = {}) => vm.$u.get('/merchant-underline/merchant/underline/query/pay-channel/wx', params);  //查询微信支付开通进度
	let	wxProgress = (params = {}) => vm.$u.get('/merchant-underline/merchant/underline/merchant/wx/progress', params);   //获取微信填写资料进度
	/* 保证金管理 start*/
	let getMerchantBond = (params = {}) => vm.$u.get('/merchant-underline/merchant/bond/getMerchantBond', params); //获取保证金
	let bondPay = (params = {}) => vm.$u.post('/merchant-underline/merchant/bond/bondPay', params); //保证金缴纳
	/* 保证金管理 end*/
	
	/* 门店设置*/
	let merchantInfo = (params = {}) => vm.$u.get('/merchant-underline/merchant/underline/info', params); //获取商家信息
	let supplementInfo = (params = {}) => vm.$u.put('/merchant-underline/merchant/underline/supplement/info', params); //完善商家资料
	/* 门店设置 end*/
	
	/** 套餐管理 */
	let combo = (params = {}) => vm.$u.get('/merchant-underline/merchant/combo/getMerchantList', params); //查询套餐列表
	let comboBuy = (params = {}) => vm.$u.post('/merchant-underline/merchant/combo/comboBuy', params); // 购买套餐
	/** 套餐管理 end*/
	//订单
	let foodOrderList = (params = {}) => vm.$u.get('/mall-order/merchant/admin/foodOrder/orderList',params); //订单列表
	let foodOrderDetails = (params = {}) => vm.$u.get('/mall-order/merchant/admin/foodOrder/OrderDetails',params); //订单详情
	let foodRefundAudit = (params = {}) => vm.$u.post('/mall-order/merchant/admin/foodOrder/refundAudit',params); //退款接口--用于扫描支付的订单，只有付款成功的时候
	let scanCode = (params = {}) => vm.$u.post('/mall-order/merchant/admin/foodOrder/food/scanCode',params); //核销订单
	vm.$u.offlineApi = {
		noticeList,
		dataAnalysis,
		foodList,
		foodDetails,
		foodEdit,
		foodStatus,
		foodStatistics,
		getSweet,
		sweetTransfer,
		sweetQuery,
		getWxApplyPayChannel,
		wxPayChannel,
		wxProgress,
		payChannel,
		payChannelOn0rOff,
		getMerchantBond,
		bondPay,
		merchantInfo,
		supplementInfo,
		combo,
		comboBuy,
		foodOrderList,
		foodOrderDetails,
		foodRefundAudit,
		scanCode
	}
}
export default {
	install
}
